In this project I utilized data from the CA Department of Fish and Wildlife to visualize oil spill incidents across California by county.
This analysis utilizes data by the California Department of Fish and Wildlife that monitors and tracks Oil Spill Releases across the state of California. The database is designed to provide The Office of Spill Prevention and Response (OSPR) with quantified statistical data on oil spill response by OSPR field responders. The OSPR Incident Tracking Database System project was initiated to provide OSPR with oil spill incident data for statistical evaluation and justification for program planning, drills and exercise training and development, legislative analysis, budget preparation, to inform and educate the public and analyze OSPRs overall spill preparedness and response performance. An “incident”, for purposes of this database, is “a discharge or threatened discharge of petroleum or other deleterious material into the waters of the state.
We will be visualizing oil spill incidents within the data to identify trends or regions of numerous incidents.
# read in counties
ca_counties_sf <- read_sf('~/Desktop/Bren/UCSB/2nd Year/2 - Winter 2022/ESM244_Adv_Data_Analysis/Website/bmcgovern_website/_research_portfolio/2022-03-14-Oil-spill-CA/data/ca_counties/CA_Counties_TIGER2016.shp') %>%
janitor::clean_names()
ca_counties_sub_sf <- ca_counties_sf %>%
janitor::clean_names() %>%
select(county_name = name, land_area = aland)
# check counties projection
#st_crs(ca_counties_sf) #ESPG3857
# read in oil spill incident tracking
spill_tracking_sf <- read_sf(here('~/Desktop/Bren/UCSB/2nd Year/2 - Winter 2022/ESM244_Adv_Data_Analysis/Website/bmcgovern_website/_research_portfolio/2022-03-14-Oil-spill-CA/data/Oil_Spill_Incident_Tracking_ds394'),
layer = 'Oil_Spill_Incident_Tracking_[ds394]') %>%
janitor::clean_names()
# check spill tracking projection
#st_crs(spill_tracking_sf) #ESPG3857
# Making the map interactive
tmap_mode(mode = "view")
# Making the map
tm_shape(ca_counties_sub_sf) +
tm_borders() +
tm_fill('county_name', palette = 'Blues', alpha = 0.3, legend.show = FALSE) +
tm_shape(spill_tracking_sf) +
tm_dots(col = 'black') +
tm_layout("California Oil Spill Incidents (2007-2008)")